<!-- 修改密码 -->
<script type="text/javascript">
	$(function(){
		EBCMS.admin_index.MyPwdFormSubmit = function MyPwdFormSubmit(){
			var pwd1 = $('#pwd1').val();
			var pwd2 = $('#pwd2').val();
			if (pwd1!=pwd2) {
				EBCMS.MSG.alert('两次输入的密码不一致!');
			}else{
				if ($('#admin_indexMyPwdForm').form('validate')) {
					EBCMS.ACT.formSubmit(
						'{:U('User/savemypwd')}',
						$('#admin_indexMyPwdForm').serialize(),
						function(data){
							if (data.status==1) {
								$('#{:I('domid')}').window('destroy');
								EBCMS.MSG.show('编辑成功！');
							}else{
								EBCMS.MSG.alert(data.info);
							};
						}
					);
				}else{
					EBCMS.MSG.show('请检查红框处是否填写正确！');
				};
			};
		};
	});
</script>
<form id="admin_indexMyPwdForm" method="post">
<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'center',border:false" style="padding:10px;">
		<table cellpadding="5" class="form">
			<tr>
				<th>旧密码:</th>
				<td><input class="easyui-textbox" type="password" name="oldpassword" data-options="required:true,validType:'length[5,10]'" /></td>
			</tr>
			<tr>
				<th>新密码:</th>
				<td><input class="easyui-textbox" type="password" id="pwd1" name="password" data-options="required:true,validType:'length[5,10]'" /></td>
			</tr>
			<tr>
				<th>再次输入:</th>
				<td><input class="easyui-textbox" type="password" id="pwd2" name="passwordtwo" data-options="required:true,validType:'length[5,10]'" /></td>
			</tr>
			<tr>
				<th>温馨提示:</th>
				<td>
					密码最少5位，只能为字母与数字的组合
				</td>
			</tr>
		</table>
	</div>
	<div data-options="region:'south',border:false">
		<div class="dialog-button" style="text-align:right;border-width:1px 0 0 0;">
			<a class="easyui-linkbutton" data-options="iconcls:'icon-ok'" href="javascript:void(0)" onclick="EBCMS.admin_index.MyPwdFormSubmit();" style="width:80px">提交</a>
			<a class="easyui-linkbutton" data-options="iconcls:'icon-cancel'" href="javascript:void(0)" onclick="$('#{:I('domid')}').window('destroy');" style="width:80px">关闭</a>
		</div>
	</div>
</div>
</form>